<template>
	<view class="my">
		<view class="top">
			<view class="avatarBlock" @click="userrun()">
				<view class="con">
					<image src="../../static/logo.png" class="avatar"></image>
					<view class="right">
						<view class="nickname">用户昵称</view>
						<view class="tel">级别：店长</view>
						<view class="tel">手机号：12345678</view>
					</view>
				</view>
				<view style="margin-right: 42rpx;margin-top:50rpx;">
					<u-icon name="arrow-right" color="#000000" size="20"></u-icon>
				</view>

			</view>

			<view class="top-con">
				<view class="flex">
					<view class="s2">
						<view class="titles">
							售后审核
						</view>
						<view class="font">
							8
						</view>
					</view>

					<view @click="yq()" class="s2">
						<view class="titles">
							邀请确认
						</view>
						<view class="font">
							9
						</view>
					</view>
					<view @click="xx()" class="s2">
						<view class="titles">
							消息
						</view>
						<view class="font">
							8
						</view>

					</view>
				</view>
			</view>
		</view>
		<view class="car">
			<view class="car-title" @click="runOrder(0)">
				<text>订单</text><text>查看全部&gt;</text>
			</view>
			<view class="car-item">
				<ul>
					<li @click="runOrder(0)">
						<image src="../../static/data/shopCar1.png"></image>
						<view class="titles">
							待付款
							<u-badge :type="type" max="99" :value="value"></u-badge>
						</view>
					</li>
					<li @click="runOrder(1)">
						<image src="../../static/data/shopCar2.png"></image>
						<view class="titles">
							待发货
							<u-badge :type="type" max="99" :value="value"></u-badge>
						</view>
					</li>
					<li @click="runOrder(2)">
						<image src="../../static/data/shopCar3.png"></image>
						<view class="titles">
							待收货
							<u-badge :type="type" max="99" :value="value"></u-badge>
						</view>
					</li>

					<li @click="runOrder(3)">
						<image src="../../static/data/shopCar4.png"></image>
						<view class="titles">
							已完成
							<u-badge :type="type" max="99" :value="value"></u-badge>
						</view>
					</li>
					<li @click="runOrder(4)">
						<image src="../../static/data/shopCar5.png"></image>
						<view class="titles">
							售后退款
							<u-badge :type="type" max="99" :value="value"></u-badge>
						</view>

					</li>
				</ul>
			</view>
		</view>
		<view class="cellgroup">
			<view :border="false">
				<view :title="item.title" isLink @click="go(item.url)" v-for="(item,index) in itemList">
					<view slot="icon">
						<image class="iconSize" :src="item.img" mode="aspectFill"></image>
					</view>
				</view>
			</view>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: "warning",
				value: 100,
				itemList: [{
					title: "邀请好友",
					img: "../../static/data/yq.png",
					url: "./friends/friends"
				}, {
					title: "收款账号",
					img: "../../static/data/skzh.png",
					url: "./bindcardlist/bindcardlist"
				}, {
					title: "地址管理",
					img: "../../static/data/address.png",
					url: '/pages/index/address/address'
				}, {
					title: "联系客服",
					img: "../../static/data/lxkf.png",
					url: "./customer/customer"
				}, {
					title: "意见反馈",
					img: "../../static/data/feedback.png",
					url: "./feedback/feedback"
				}, {
					title: "设置",
					img: "../../static/data/set.png",
					url: "./setup/setup"
				}, {
					title: "退出登录",
					img: "../../static/data/out.png",
					url: ""
				}],
				tel: "",
				Imgurls: "",
				token: ""
			}
		},
		onShow() {},
		methods: {

			go(url) {
				if (url) {
					uni.navigateTo({
						url: url
					})
				} else {
					uni.$u.toast("功能开发中")
				}

			},


			call(tell) {
				uni.makePhoneCall({
					phoneNumber: tell, //电话号码
					success: function(e) {
						console.log(e, '---');
					},
					fail: function(e) {
						console.log(e);
					}
				})
			},
			userrun() {
				// uni.navigateTo({
				// 	url:'/pagesA/userInfor/userInfor'
				// })
			},
			yq() {
				uni.navigateTo({
					url: '/pages/mine/invite/invite'
				})
			},
			xx() {
				uni.navigateTo({
					url: './message/message'
				})
			},
			runOrder(current) {
				uni.setStorageSync("current", current)
				uni.switchTab({
					url: '/pages/order/order'
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f9f9f9;
	}

	.my {
		display: flex;
		flex-direction: column;
		padding-bottom: 34rpx;

		.top {
			width: 682rpx;
			height: auto;
			background-color: #FFFFFF;
			margin: 20rpx auto 0;

			.top-con {
				margin: 0 auto;
				float: none;
				overflow: hidden;
				margin-top: 25rpx;
				color: #333333;
				border-top: 1rpx solid #F5F5F5;

				.s2 {
					flex: 1;
					text-align: center;

					.titles {
						font-size: 28rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						color: #333333;
						margin: 10px 0;
					}

					.font {
						font-size: 50rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						color: #FF3B06;
					}
				}
			}

			.avatarBlock {
				width: 100%;
				height: auto;
				display: flex;
				justify-content: space-between;

				.con {
					display: flex;

					.nickname {
						font-size: 32rpx;
						font-family: PingFang SC-Bold, PingFang SC;
						font-weight: bold;
						color: #000000;
						line-height: 32rpx;
						margin-top: 40rpx;
					}

					.tel {
						font-size: 24rpx;
						font-family: PingFang SC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
						line-height: 24rpx;
						margin-top: 24rpx;
					}
				}

				.avatar {
					width: 140rpx;
					height: 140rpx;
					border-radius: 50%;
					margin: 20rpx;
				}
			}
		}

		.cellgroup {
			width: 682rpx;
			height: auto;
			margin: 40rpx auto;
			display: flex;
			background-color: #FFFFFF;
			font-size: 28rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
			border-radius: 16rpx;

			.iconSize {
				width: 42rpx;
				height: 42rpx;
				margin-right: 20rpx;
			}

			.u-slot-value {
				background-color: #FE4030;
				color: #FFFFFF;
				padding: 2rpx 10rpx;
				border-radius: 50rpx;
			}
		}

		.car {
			width: 682rpx;
			height: 230rpx;
			margin: 0 auto;
			margin-top: 20rpx;
			background-color: #FFFFFF;
			border-radius: 16rpx;

			.car-title {

				height: 86rpx;
				line-height: 86rpx;
				padding: 0 20rpx;
				display: flex;
				justify-content: space-between;
				border-bottom: 1rpx solid #F5F5F5;

				text:first-child {
					font-size: 32rpx;
					font-family: PingFang SC-Bold, PingFang SC;
					font-weight: bold;
					color: #333333;
				}

				text:last-child {
					font-size: 28rpx;
					font-family: PingFang SC-Medium, PingFang SC;
					font-weight: 500;
					color: #777777;
				}
			}

			.car-item {
				width: 682rpx;
				height: auto;
				margin: 0 auto;
				float: none;
				overflow: hidden;

				color: #333333;



				ul {
					display: flex;
					margin-top: 33rpx;
					padding: 0 !important;
				}

				li {
					list-style: none;
					flex: 1 0 20%;
					width: 140rpx;
					height: auto;
					text-align: center;
					margin: 0 auto;
					position: relative;

					image {
						width: 47rpx;
						height: 41rpx;

					}

					text {
						background: #E21818;
						border-radius: 50%;
						color: #FFFFFF;
						position: absolute;
						text-align: center;
						right: 30rpx;
						top: -20rpx;
						padding: 5rpx;
						font-size: 24rpx;
					}

					.titles {
						font-size: 28rpx;
						font-family: PingFang SC-Medium, PingFang SC;
						font-weight: 500;
						color: #333333;
						line-height: 40rpx;
						text-align: center;
					}
				}
			}
		}
	}

	.pop-con {
		width: 390rpx;
		padding: 160rpx 129rpx 0;
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;
		line-height: 60rpx;
		margin-top: 22rpx;
	}

	.pop-btn {
		width: 280rpx;
		height: 90rpx;
		background: linear-gradient(270deg, #2367CA 0%, #3986F6 100%);
		border-radius: 46rpx 46rpx 46rpx 46rpx;
		opacity: 1;
		margin: 47rpx auto;
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #FFFFFF;
		line-height: 90rpx;
	}

	.pop-btn2 {
		width: 280rpx;
		height: 90rpx;

		background: #DFECFF;
		border-radius: 46rpx 46rpx 46rpx 46rpx;
		opacity: 1;
		margin: 47rpx auto;
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #194E9A;
		line-height: 90rpx;
	}

	.btnstyle {
		font-size: 24rpx;
		border: none;
	}
</style>